import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;

public class shuangseqiu {

    private static final int RED_BALL_COUNT = 6;
    private static final int RED_BALL_RANGE = 33;
    private static final int BLUE_BALL_COUNT = 1;
    private static final int BLUE_BALL_RANGE = 16;

    public static void main(String[] args) {
        List<Integer> redBalls = generateRedBalls();
        int blueBall = generateBlueBall();

        System.out.println("红球号码: " + redBalls);
        System.out.println("蓝球号码: " + blueBall);
    }

    private static List<Integer> generateRedBalls() {
        List<Integer> redBalls = new ArrayList<>();
        Random random = new Random();

        while (redBalls.size() < RED_BALL_COUNT) {
            int ball = random.nextInt(RED_BALL_RANGE) + 1;
            if (!redBalls.contains(ball)) {
                redBalls.add(ball);
            }
        }

        Collections.sort(redBalls);

        return redBalls;
    }

    private static int generateBlueBall() {
        Random random = new Random();
        return random.nextInt(BLUE_BALL_RANGE) + 1;
    }
}